1. Field of the Invention
Example embodiments of the present invention relate generally to a device driver including a flash memory file system and method thereof and a flash memory device and method thereof, and more particularly to a device driver including a flash memory file system and a method of managing the flash memory file system and a flash memory device and method of storing information within the flash memory device.
2. Description of the Related Art
Flash memory devices may be configured to have attributes associated with both a random access memory (RAM) and a read-only memory (ROM). For example, a conventional flash memory device may be configured to re-write over old data, as in a RAM, and also to maintain stored data without a continuous power supply, as in a ROM or “solid-state” memory device.
Conventional flash memory device may be different from other types of storage devices, such as hard disk devices and semiconductor memory devices, such as RAM and ROM. For example, a conventional flash memory device may not perform an in-place update on areas in which data may already be written. Accordingly, software may be provided so as to instruct conventional flash memory devices to perform in-place updates.
Hereinafter, operation of a conventional flash memory device driver will be described with reference to FIGS. 1 through 4.
FIG. 1 is a diagram illustrating a structure of data blocks stored in a conventional flash memory device. Referring to FIG. 1, the flash memory device may include a plurality of data blocks 110, each including a plurality of pages 120. For example, each data block 110 may include four pages and a page size may correspond to a size of a sector (e.g., 512 bytes).
Referring to FIG. 1, the flash memory device driver may perform an erase operation on the data blocks 110 and may perform read and write operations on the pages 120 within respective data blocks 110. A logical address generated by an application may typically not be directly written to the flash memory device. Rather, a virtual or physical address for a particular data block 110 may be obtained based on the logical address through a “mapping” process.
FIGS. 2 through 4 are diagrams for illustrating a write operation performed by the flash memory device driver of FIG. 1. Referring to FIG. 2, the flash memory device driver may receive a logical address from an application (e.g., a software application) and may map the received logical address into a virtual address (e.g., a physical address) used in the flash memory device (at S210). The flash memory device driver may write data based on the mapped virtual address (at S220).
Referring to FIG. 3, assuming that first data A and second data B1 are written, and third data B2 modifying the second data B1 and fourth data C are written, the first through fourth data A, B1, B2 and C may be sequentially stored in a data block 250 (e.g., within sequential pages of data block 250). The flash memory device driver may receive a logical address of fifth data B3 re-modifying the third data B2. The flash memory device driver may map the virtual address (e.g., in which the data block 250 including the third data B2 may be located) based on the received logical address (at S310).
Referring to FIG. 3, the flash memory device controller may detect that there are no empty pages in the data block 250, and may allocate a new data block 350 (at S320). The flash memory device controller may copy valid data, which may refer to data having a valid value (e.g., the first data A and the fourth data C), into the new allocated data block 350. The flash memory device driver may write the fifth data B3 into an empty page of the new allocated data block 350 (at S330).
Referring to FIG. 4, the flash memory device driver may perform an erase operation on the data block 250 including only invalid data (at S410).
As illustrated in FIGS. 2 through 4, the flash memory device driver may allocate a significant amount of time to page-copying if pages in the data block are changed or frequently updated. Accordingly, frequently updating pages may degrade a performance of the flash memory device. For example, even if the first and fourth data A and C are not modified, the first and fourth data A and C may be copied due to their relationship to more frequently modified data, such as the second data B1.